
<CFIF trim(GetForm.PREPROCESS) IS NOT "">
	<!--- Check if template is existing --->
	<CFIF FileExists("#GetDirectoryFromPath(GetCurrentTemplatePath())#..#application.fileseparator#pre_activities#application.fileseparator##GetForm.PREPROCESS#")>
		<CFSET lPreProcessValidated="No">

		<CFIF GetForm.PREPROCESSTITLE IS "">
			<CFSET sPreProcessTitle="Pre-process Activity">
		<CFELSE>
			<CFSET sPreProcessTitle=GetForm.PREPROCESSTITLE>
		</CFIF>

		<CFQUERY NAME="GetEntry" DATASOURCE="#table_dsn#" MAXROWS=1>
			SELECT *
			FROM #GetForm.TABLENAME_FK#
			WHERE
				(PERSONNELIDNO = '#GetEmployee.PERSONNELIDNO#')
				<CFLOOP  INDEX="x" FROM="1" TO="5">
					<CFIF evaluate("GetForm.PK_FIELD" & x) NEQ "">
						<CFSET theVal = evaluate("Form.old" & evaluate("GetForm.PK_FIELD" & x))>
						AND (#ucase(evaluate("GetForm.PK_FIELD" & x))# = '#theVal#')
					</CFIF>
				</CFLOOP>
		</CFQUERY>

		<CFINCLUDE TEMPLATE="..\pre_activities\#GetForm.PREPROCESS#">
		<CFSET lPreProcessValidated="YES">
	</CFIF>
<CFELSE>
	<CFSET lPreProcessValidated="Yes">
</CFIF>

